<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>我的收藏</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" type="text/css" href="css/public.css">
	<link rel="stylesheet" type="text/css" href="css/main_style.css">
	<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/1.10.2/jquery.js"></script>
	<script type="text/javascript" src="js/fontsize.js"></script>
	<script type="text/javascript" src="js/public.js"></script>
</head>
<body>
<!-- 顶部 -->
<div class="head white head_cen f26"><a class="iconfont back white" href="javascript:;">&#xe60b;</a><span class="f34 txt-center">商品收藏</span></div>
<div class="edit border_bot_e1 f22 pl20 pr20 pb10 pt10"><span class="black">您收藏了<i class="num"></i>个商品</span><a class="fr black" href="javascript:;">编辑</a></div>
<!-- 购物车 -->
<div id="collect" class="carts collect">
	<ul class="border_bot_e1">
		<li class="carts_check hide"><i class="iconfont check"></i></li>
		<li class="carts_img"><a href="#" class="full_img"><img src="images/none/p-3.jpg"></a></li>
		<li class="carts_info pl20 pr20">
			<h5 class="normal f20"><a href="#">Braun/博朗欧乐 BType3744 电动牙刷博朗欧乐 BType3744 电动牙刷</a></h5>
			<div class="red f30 pt35 mt10">￥<span class="price">1.01</span></div>
		</li>
		<li class="carts_cancel bg-red txt-center"><a href="javascript:;" class="cancel white">取消</a></li>
	</ul>
	<ul class="border_bot_e1">
		<li class="carts_check hide"><i class="iconfont check"></i></li>
		<li class="carts_img"><a href="#" class="full_img"><img src="images/none/p-3.jpg"></a></li>
		<li class="carts_info pl20 pr20">
			<h5 class="normal f20"><a href="#">Braun/博朗欧乐 BType3744 电动牙刷博朗欧乐 BType3744 电动牙刷</a></h5>
			<div class="red f30 pt35 mt10">￥<span class="price">1.01</span></div>
		</li>
		<li class="carts_cancel bg-red txt-center"><a href="javascript:;" class="cancel white">取消</a></li>
	</ul>
	<ul class="border_bot_e1">
		<li class="carts_check hide"><i class="iconfont check"></i></li>
		<li class="carts_img"><a href="#" class="full_img"><img src="images/none/p-3.jpg"></a></li>
		<li class="carts_info pl20 pr20">
			<h5 class="normal f20"><a href="#">Braun/博朗欧乐 BType3744 电动牙刷博朗欧乐 BType3744 电动牙刷</a></h5>
			<div class="red f30 pt35 mt10">￥<span class="price">1.01</span></div>
		</li>
		<li class="carts_cancel bg-red txt-center"><a href="javascript:;" class="cancel white">取消</a></li>
	</ul>
</div>
<!-- 页脚导航 -->
<div class="foot bg-white select_all dis_none">
	<div class="p10 ml10 mr10 f26 clearfix">
		<span class="fl mt10"><i class="iconfont check vertical_middle"></i><span class="vertical_middle ml10">全选</span></span>
		<a href="javascript:;" class="white btn_billing fr">取消收藏</a>
	</div>
</div>
<script type="text/javascript" src="js/carts.js"></script>
<script type="text/javascript">
$(document).resize(function(){
	setWidth('.collect ul','.carts_cancel');
});

$(function(){
	//触屏滑动
	var wCancelRow=$("#collect").find('.carts_cancel').outerWidth();
	touchMove('collect','ul',wCancelRow);
    document.documentElement.onclick=function(){
    	reSetTouch('collect','ul');
    };

	setWidth('.collect ul','.carts_cancel');

	fnSelect_collect(".select_all", ".carts", ".check");//全选

	//取消收藏当前项
	$('.cancel').bind('click', function(){
		$(this).parentsUntil('.collect').remove();
		fnCount('.edit .num' ,'.collect');
		if($('.edit .num').eq(0).text()=='0') $('.select_all .btn_billing').addClass('btn_disable');
	});

	$('.edit a').bind('click',function(){//编辑按钮
		if($(this).html()=='编辑'){
			$(this).html('完成');
		}else{
			$(this).html('编辑');
		}
		editCollect('.collect' ,'.select_all');
	});

	//统计数量
	fnCount('.edit .num' ,'.collect');
	if($('.edit .num').eq(0).text()=='0') $('.select_all .btn_billing').addClass('btn_disable');

	//多项取消收藏
	$('.select_all .btn_billing').bind('click',function(event) {
		delCollect('.collect');
		fnCount('.edit .num' ,'.collect');
		if($('.edit .num').eq(0).text()=='0') {
			$(this).addClass('btn_disable');
			$(this).siblings('span').find('.check').removeClass('checked').html('');
		}
	});
});

</script>
</body>
</html>